clc
clear 
close all

addpath('../');
addpath('../utils_rotations');
addpath('../utils_KF_DDP');

global idx 
global relevant_idx
global target_hover_state
global H
global dt
global model

load problem.mat

relevant_idx = [idx.u_prev idx.u_delta_prev idx.ned_dot idx.ned idx.pqr idx.q];
weight0 = zeros(1, length(idx.inputs)*length(relevant_idx));


sol = fminsearch(@evaluate_perturb,weight0,optimset('Display','iter'));

       